package com.wei.jvm.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @GetMapping("/hello2")
    public String hello2(){

        while (true){
            HashMap<String,Object> hash = new HashMap<>();
            List<String> list = new ArrayList<>();
            for(int index=0;index<=10000;index++){
                list.add(String.valueOf(index));
            }
            hash.put("name", list);

            if(1==0) {
                break;
            }
        }

        return "hello";
    }
}
